import left1 from '@/images/corn/plane/left1.png'
import left2 from '@/images/corn/plane/left2.png'
import left3 from '@/images/corn/plane/left3.png'
import left4 from '@/images/corn/plane/left4.png'
import left5 from '@/images/corn/plane/left5.png'
import left6 from '@/images/corn/plane/left6.png'
import w1 from '@/images/corn/plane/w1.png'
import w2 from '@/images/corn/plane/w2.png'
import w3 from '@/images/corn/plane/w3.png'
import w4 from '@/images/corn/plane/w4.png'
import * as echarts from 'echarts'
export const leftTop = [
    { name: '吉农大819', num: 8, icon: left1 },
    { name: '福来818', num: 8, icon: left2 },
    { name: '辽科38', num: 8, icon: left3 },
    { name: '天农九', num: 8, icon: left4 },
    { name: '天宇108', num: 8, icon: left5 },
    { name: '先玉1224', num: 8, icon: left6 },
]
export const leftCenter = {
    backgroundColor: 'transparent',
    title: {
        show: false,
        text: '哎呦,不错哦',
        textStyle: {
            align: 'center',
            color: '#fff',
            fontSize: 20,
        },
        top: '5%',
        left: 'center',
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            lineStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(0, 255, 233,0)'
                    }, {
                        offset: 0.5,
                        color: 'rgba(255, 255, 255,1)',
                    }, {
                        offset: 1,
                        color: 'rgba(0, 255, 233,0)'
                    }],
                    global: false
                }
            },
        },
    },
    grid: {
        top: '5%',
        left: '0%',
        right: '5%',
        bottom: '5%',
        containLabel: true
    },
    xAxis: [{
        show: true,
        type: 'category',
        axisLine: {
            show: false
        },
        splitArea: {
            show: false,
            color: '#f00',
            lineStyle: {
                color: '#f00'
            },
        },
        axisTick: {
            show: false
        },
        axisLabel: {
            color: '#fff',
            show: true,
            inside: false
        },
        splitLine: {
            show: false
        },
        boundaryGap: false,
        data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月'],

    }],

    yAxis: [{
        type: 'value',
        min: 1000,
        max: 8000
    }],
    series: [{
        name: '2021',
        type: 'line',
        // smooth: true, //是否平滑
        symbolSize: 0,
        lineStyle: {
            normal: {
                color: "#6c50f3",
                shadowColor: 'rgba(0, 0, 0, .3)',
                shadowBlur: 0,
                shadowOffsetY: 5,
                shadowOffsetX: 5,
            },
        },
        label: {
            show: false,
            position: 'top',
            textStyle: {
                color: '#6c50f3',
            }
        },
        itemStyle: {
            color: "#6c50f3",
            borderColor: "#fff",
            borderWidth: 3,
            shadowColor: 'rgba(0, 0, 0, .3)',
            shadowBlur: 0,
            shadowOffsetY: 2,
            shadowOffsetX: 2,
        },

        areaStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: 'rgba(108,80,243,1)'
                },
                {
                    offset: 1,
                    color: 'rgba(108,80,243,0)'
                }
                ], false),
                // shadowColor: 'rgba(108,80,243, 0.9)',
                // shadowBlur: 20
            }
        },
        data: [7000, 6800, 5900, 7200, 4712, 6612, 7000, 6800, 5900, 7200, 4712, 6612]
    },
    {
        name: '2022',
        type: 'line',
        // smooth: true, //是否平滑
        showAllSymbol: true,
        // symbol: 'image://./static/images/guang-circle.png',
        symbol: 'circle',
        symbolSize: 0,
        lineStyle: {
            normal: {
                color: "#00ca95",
                shadowColor: 'rgba(0, 0, 0, .3)',
                shadowBlur: 0,
                shadowOffsetY: 5,
                shadowOffsetX: 5,
            },
        },
        label: {
            show: false,
            position: 'top',
            textStyle: {
                color: '#00ca95',
            }
        },

        itemStyle: {
            color: "#00ca95",
            borderColor: "#fff",
            borderWidth: 3,
            shadowColor: 'rgba(0, 0, 0, .3)',
            shadowBlur: 0,
            shadowOffsetY: 2,
            shadowOffsetX: 2,
        },

        areaStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: 'rgba(0,202,149,1)'
                },
                {
                    offset: 1,
                    color: 'rgba(0,202,149,0)'
                }
                ], false),
                // shadowColor: 'rgba(0,202,149, 0.9)',
                // shadowBlur: 20
            }
        },
        data: [7200, 7800, 6600, 3200, 6712, 7612, 7200, 7800, 6600, 3200, 6712, 7612],
    },
    ]
}
export const leftBottom = {}

export const weatherData = [
    { icon: w1, name: '降水', value: '0mm' },
    { icon: w2, name: '西南风', value: '微风' },
    { icon: w3, name: '相对温度', value: '35%' },
    { icon: w4, name: '气压', value: '1023hpa' },
]
// export const forecast = []
// Generate data
var category = [];
var dottedBase = +new Date();
var lineData = [];
var barData1 = [];
var barData2 = [];
for (var i = 0; i < 10; i++) {
    var date = new Date(dottedBase += 1000 * 3600 * 24);
    category.push([
        date.getFullYear(),
        date.getMonth() + 1,
        date.getDate()
    ].join('-'));
    // if (i<=10&&i>=1){
    //     category.push(i);
    // }
    var b = Math.random() * 200;
    var d = Math.random() * (-200);
    barData1.push(b)
    barData2.push(d)
}
export const rightCenterLeft = {
    backgroundColor: 'transparent',
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow',
            label: {
                show: true,
                backgroundColor: '#333'
            }
        }
    },
    legend: {
        data: ['收入', '支出'],
    },
    grid: {
        top: '15%',
        left: '0%',
        right: '5%',
        bottom: '5%',
        containLabel: true
    },
    xAxis: {
        type: 'category',
        data: category,
        axisTick: {
            alignWithLabel: true
        },

        splitLine: {
            show: false,

        },
        axisLabel: {
            //fontWeight:10,
            //interval:2,
            fontsize: 2,
            align: 'center',
            color: '#fff'
        }
    },
    yAxis: [{
        type: 'value',
        splitLine: {
            show: true,
            lineStyle: {
                color: 'rgba(255,255,255,0.2)'
            }
        },
        axisLine: {
            show: false
        },
        axisLabel: {

            fontWeight: 10,
            fontsize: 5,
            color: '#fff'
        }

    }],
    series: [{
        name: '收入',
        type: 'bar',
        stack: '总量',
        barWidth: 10,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(
                    0, 0, 0, 1,
                    [
                        { offset: 0, color: '#116CFD' },
                        { offset: 1, color: '#0BAEFD' }
                    ]
                )
            }
        },
        data: barData1
    }, {
        name: '支出',
        type: 'bar',
        stack: '总量',
        barWidth: 10,
        itemStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(
                    0, 0, 0, 1,
                    [
                        { offset: 0, color: '#51C4FF' },
                        { offset: 1, color: '#51FFD0' }
                    ]
                )
            }
        },
        data: barData2
    }]
};

export const rightCenterRight = {
    backgroundColor: 'transparent',
    title: {
        text: '排名',
        x: 'center',
        y: 'center',
        textStyle: {
            fontWeight: 'normal',
            fontSize: 16
        }
    },
    tooltip: {
        show: false,
        trigger: 'item',
        formatter: "{b}: {c} ({d}%)"
    },
    legend: {
        orient: 'horizontal',
        bottom: '0%',
        data: ['双阳区', '九台区', '农安县', '榆树市', '榆树市']
    },
    series: [{
        type: 'pie',
        selectedMode: 'single',
        radius: ['35%', '58%'],
        color: ['#86D560', '#AF89D6', '#59ADF3', '#FF999A', '#FFCC67'],

        label: {
            normal: {
                position: 'inner',
                formatter: '{d}%',

                textStyle: {
                    color: '#fff',
                    fontWeight: 'bold',
                    fontSize: 14
                }
            }
        },
        labelLine: {
            normal: {
                show: false
            }
        },
        data: [{
            value: 3661,
            name: '双阳区'
        }, {
            value: 5713,
            name: '九台区'
        }, {
            value: 9938,
            name: '农安县'
        }, {
            value: 17623,
            name: '榆树市'
        }, {
            value: 3299,
            name: '榆树市'
        }]
    }]
};
export const rightBottomLeft = {
    tableColumns: [
        { key: 'A111', title: '非正常节点数' },
        { key: 'B111', title: '节点数' },
        { key: 'C111', title: '总比例' },
    ],
    tableRows: [
        {
            A111: '2043',
            B111: '1876',
            C111: '1554',
            ID: '总数'
        },
        {
            A111: '1678',
            B111: '213',
            C111: '433',
            ID: '正常'
        },
        {
            A111: '781',
            B111: '445',
            C111: '33',

            ID: '预警'
        },
        {
            A111: '664',
            B111: '317',
            C111: '115',

            ID: '超限'
        },
        {
            A111: '741',
            B111: '234',
            C111: '15',
            ID: '冻结'
        },
        {
            A111: '124',
            B111: '22',
            C111: '0',
            ID: '督办'
        },
        {
            A111: '124',
            B111: '22',
            C111: '0',
            ID: '督办'
        },
    ],
}
export const rightBottomRight = {
    backgroundColor: 'transparent',
    color: ["#47dfe5", '#a07fef', "#70b4f9", '#fac800', '#ffa200', "#4be39d"],
    grid: {
        top: '5%',
        left: '0%',
        right: '5%',
        bottom: '5%',
        containLabel: true
    },
    tooltip: {
        trigger: 'axis'
    },
    legend: {
        top: 35,
        data: ['蒸发量', '降水量1', '降水量2', '降水量3']
    },
    xAxis: [{
        type: 'category',
        data: ['2017/01', '2017/02', '2017/03', '2017/04', '2017/05'],
        axisLine: {
            show: false
        },
        axisTick: {
            show: false
        },
    }],
    yAxis: [{
        type: 'value',
     
        axisLine: {
            show: false
        },
        axisTick: {
            show: false
        },
        splitLine: {
            show: false,
            lineStyle: {
                color: "#9fa0a0"
            }
        }
    }, {
        type: 'value',
      
        axisLine: {
            show: false
        },
        axisTick: {
            show: false
        },
        splitLine: {
            show:false,
            lineStyle: {
                color: "#dcdddd"
            }
        }
    }],
    series: [
        {
            name: '各项存款余额',
            type: 'bar',
            data: (function () {
                var data = [];
                for (var i = 0; i < 5; i++) {
                    data.push(Math.random() * 100)
                }
                return data
            })(),
            barWidth: 20,
            itemStyle: {
                normal: {
                    color: '#287CE7',
                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                    shadowBlur: 10,
                    barBorderRadius: [5, 5, 0, 0],
                }
            }
        }, {
            name: '各项贷款余额',
            type: 'bar',
            data: (function () {
                var data = [];
                for (var i = 0; i < 5; i++) {
                    data.push(Math.random() * 100)
                }
                return data
            })(),
            barWidth: 20,
            itemStyle: {
                normal: {
                    color: '#F2C347',
                    shadowColor: 'rgba(0, 0, 0, 0.1)',
                    shadowBlur: 10,
                    barBorderRadius: [5, 5, 0, 0],
                }
            }
        },
        {
            name: '各项贷款余额',
            type: 'line',
            smooth: true,
            symbol: 'circle',
            symbolSize: 0,
            yAxisIndex:1,
            lineStyle: {
                normal: {
                    width: 3,
                    color:'#287CE7'
                }
            },
            data: (function () {
                var data = [];
                for (var i = 0; i < 5; i++) {
                    data.push(Math.random() * 1000)
                }
                return data
            })()
        },
        {
            name: '各项贷款余额',
            type: 'line',
            smooth: true,
            yAxisIndex:1,
            symbol: 'circle',
            symbolSize: 0,
            lineStyle: {
                normal: {
                    color:'#F2C347',
                    width: 3
                }
            },
            data: (function () {
                var data = [];
                for (var i = 0; i < 5; i++) {
                    data.push(Math.random() * 1000)
                }
                return data
            })()
        }]
};